<script setup>
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex';
const router = useRouter();
const store = useStore();

// 点击登陆注册跳转至登录页
const toLogin = () => {
  router.push({ path: '/login' });
};
</script>
<template>
  <div class="header">
    <div class="user-img">
      <img src="">
    </div>
    <div
      class="login"
      @click="toLogin"
    >
      <span>登录</span>
      <span>/</span>
      <span>注册</span>
    </div>
  </div>
  <div class="user-content">
    <div class="order">
      <span>我的订单</span>
      <i-ep-ArrowRight class="iconfont" />
    </div>
    <div class="want-watch">
      <span>想看的电影</span>
      <i-ep-ArrowRight class="iconfont" />
    </div>
    <div class="watched">
      <span>看过的电影</span>
      <i-ep-ArrowRight class="iconfont" />
    </div>
  </div>
</template>

<style lang="scss" scope>
body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.header {
  width: 100%;
  height: 140px;
  background-color: #dd2727;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  .user-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin-left: 20px;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .login {
    width: 100px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    span {
      color: #fff;
      font-size: 16px;
      font-weight: 600;
    }
  }
}
.user-content {
  width: 100%;
  height: calc(100% - 140px);
  box-sizing: border-box;
  background-color: #f5f5f5;
  .order, .want-watch, .watched {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #fff;
    box-sizing: border-box;
    margin-bottom: 6px;
    span {
      color: #333;
      font-size: 16px;
    }
    .iconfont {
      font-size: 16px;
      color: #333;
    }
  }
}
</style>
